#ifndef FRAMEWORK_H
#define FRAMEWORK_H

#include "cnsDefaultComFactory.h"

class Framework
{
public:
    Framework();
    ~Framework();

    void readComDefinition(const QString &path);

    void registerSystem(const QString &name, QObject* system);
//    void autoCreateComponent(const QString &path);
    CnsComponentPtr getComponent(const QString& defPath);
    CnsComponentPtr newComponent(const QString& objName, const QString& defPath="", const REPLACEPATHLIST &replacePath=REPLACEPATHLIST());
    const QString* getDefFullPath(const QString* dirFullPath, const QString& defPath, const QString& propName);
    inline int removeRefObj(const QString *objPath, bool isNew)
    {
        return _comFactory->removeRefObj(objPath, isNew);
    }
    inline QObject* getSystem(const QString &name)
    {
        return _comFactory->getSystem(name);
    }

private:

    CnsDefaultComFactoryPtr _comFactory;
};

#endif // FRAMEWORK_H
                         
